package com.my.mvpframe.base.app;

import android.content.Context;

import com.facebook.stetho.Stetho;
import com.my.mvpframe.base.dagger.DaggerAppComponent;

import dagger.android.AndroidInjector;
import dagger.android.support.DaggerApplication;


/**
 * Created by ZJ register 2018/1/30.
 */

public class BaseApplication extends DaggerApplication {
    private static Context mContext;

    @Override
    public void onCreate() {
        super.onCreate();
        mContext = this;

        //初始化Stetho
        Stetho.initializeWithDefaults(this);
    }


    public static Context getContext() {
        return mContext;
    }

    @Override
    protected AndroidInjector<? extends DaggerApplication> applicationInjector() {
        return DaggerAppComponent.builder().application(this).build();
    }
}
